using System;
using System.Collections.Generic;
using System.ServiceModel;
using System.Threading.Tasks;
using System.Collections.ObjectModel;

namespace TaskClient2012.SystemService
{
    public partial class SystemServiceClient 
    {
        public Task DoWorkTaskAsync()
        {
            return Task.Factory.FromAsync(this.Channel.BeginDoWork, this.Channel.EndDoWork , null);
        }
public Task<DateTime> GetSerivceTimeTaskAsync()
        {
            return Task<DateTime>.Factory.FromAsync(this.Channel.BeginGetSerivceTime, this.Channel.EndGetSerivceTime , null);
        }
public Task<String> SayHiToTaskAsync(String name)
        {
            return Task<String>.Factory.FromAsync(this.Channel.BeginSayHiTo, this.Channel.EndSayHiTo ,name, null);
        }
public Task<Decimal> GetNumTaskAsync(Decimal num)
        {
            return Task<Decimal>.Factory.FromAsync(this.Channel.BeginGetNum, this.Channel.EndGetNum ,num, null);
        }

    }
}
namespace TaskClient2012.UserService
{
    public partial class UserServiceClient 
    {
        public Task<UserInfo> CreateUserTaskAsync(UserInfo user)
        {
            return Task<UserInfo>.Factory.FromAsync(this.Channel.BeginCreateUser, this.Channel.EndCreateUser ,user, null);
        }
public Task UpdateUserTaskAsync(UserInfo user)
        {
            return Task.Factory.FromAsync(this.Channel.BeginUpdateUser, this.Channel.EndUpdateUser ,user, null);
        }
public Task DeleteTaskAsync(String id)
        {
            return Task.Factory.FromAsync(this.Channel.BeginDelete, this.Channel.EndDelete ,id, null);
        }
public Task<ObservableCollection<UserInfo>> GetAllTaskAsync()
        {
            return Task<ObservableCollection<UserInfo>>.Factory.FromAsync(this.Channel.BeginGetAll, this.Channel.EndGetAll , null);
        }
public Task<UserInfo> GetUserByIdTaskAsync(String id)
        {
            return Task<UserInfo>.Factory.FromAsync(this.Channel.BeginGetUserById, this.Channel.EndGetUserById ,id, null);
        }

    }
}
